package com.paipai.controller;

import com.paipai.dao.PtypeMapper;
import com.paipai.entity.Ptype;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RequestMapping("/pType")
@RestController
public class TypeController {
    @Autowired
    private PtypeMapper ptypeMapper;

    @RequestMapping("/selectAllType")
    public List<Ptype> selectAllType(){
        List<Ptype> types = ptypeMapper.selectAll();
        return types;
    }
}
